'use strict';

/** @type {import('sequelize-cli').Migration} */
module.exports = {
  async up (queryInterface, Sequelize) {
    /**
     * Add seed commands here.
     *
     * Example:
     * await queryInterface.bulkInsert('People', [{
     *   name: 'John Doe',
     *   isBetaMember: false
     * }], {});
    */
    await queryInterface.bulkInsert('Chapters', [
      {
        courseId:1,
        title:'h5课程介绍',
        content:'这套课程,**********',
        video:'',
        rank:1,
        createdAt:new Date(),
        updatedAt:new Date()
      },
      {
        courseId:1,
        title:'css课程',
        content:'这个课程,**********',
        video:'',
        rank:2,
        createdAt:new Date(),
        updatedAt:new Date()
      },
      {
        courseId:2,
        title:'Node.js课程介绍',
        content:'这套课程,**********',
        video:'',
        rank:1,
        createdAt:new Date(),
        updatedAt:new Date()
      },
      {
        courseId:2,
        title:'安装Node.js',
        content:'这个课程,**********',
        video:'',
        rank:2,
        createdAt:new Date(),
        updatedAt:new Date()
      },
    ], {});
  },

  async down (queryInterface, Sequelize) {
    /**
     * Add commands to revert seed here.
     *
     * Example:
     * await queryInterface.bulkDelete('People', null, {});
     */
    await queryInterface.bulkDelete('Chapters', null, {});
  }
};
